//
//  Data Structures Tutorial
//
//  Copyright 2014 by Balamurugan Souppourayen <srimuruganbala@gmail.com>
//
//  Licensed under GNU General Public License 3.0 or later.
//  Some rights reserved. See COPYING, AUTHORS.
//
//  @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>
//

#include <iostream>
#include "TLinkedList.h"

using namespace std;

int main(int argc, const char * argv[])
{
  ::printf("LinkedList Example:\n");
  TLinkedList List;

  List.PushBack(11);
  List.PushBack(21);
  List.PushBack(31);
  List.PushBack(41);

  List.Insert(1, 51);
  List.Insert(3, 61);
  List.Insert(5, 71);

  List.PushFront(81);
  List.PushFront(91);
  List.PrintList();

  List.Delete(0);
  List.PrintList();

  List.Delete(List.Size() - 1);
  List.PrintList();

  List.Delete(5);
  List.PrintList();

  ::printf("Clear the list!\n");
  List.Clear();
  List.PrintList();

  return 0;
}
